package com.cn.steam.iam.mapper.iam;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cn.steam.iam.model.po.IamUser;
import com.cn.steam.iam.model.po.IamUserExtension;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

import static com.cn.steam.foundation.common.model.CommonConstant.DATA_SOURCE_KEY_IAM;


/**
 * @author huangzz
 */
@DS(DATA_SOURCE_KEY_IAM)
public interface IamUserExtensionMapper extends BaseMapper<IamUserExtension> {
    @Select("SELECT * FROM iam_user_extension WHERE user_id = #{userId}")
    List<IamUserExtension> listByUserId(@Param("userId") String userId);

    IamUser getUserByKeyAndValue(
            @Param("attributeKey") String attributeKey,
            @Param("attributeValue") String attributeValue);
}
